import instance from '../utils/request'
export function deleteProductById(goodId){
    return instance.delete(`/product/delete/${goodId}`);
}
export function deleteSupplierById(goodId){
    return instance.delete(`/goods/delete/${goodId}`);
}

export function deleteBrandById(brandId){
    return instance.delete(`/product/branddelete/${brandId}`);
}
export function deleteTypeById(typeId){
    return instance.delete(`/product/deleteTypeById/${typeId}`);
}
export function addProduct(entity) {
    return instance.post(`/product/save`,entity);
}

export function findbyid(goodId){
    return instance.get(`/product/findbyid/${goodId}`);
}
export function searchGoodsVo(goodsParams) {
    return instance.get("/product/GoodsVo",{params:goodsParams});
}
export function editProduct(entity) {
    return instance.put(`/product/edit`,entity);
}
export function addGoods(entity) {
    return instance.post(`/product/add`,entity);
}
export function addSecondGoods(entity) {
    return instance.post(`/product/addSecond`,entity);
}
export function searchGoodsbrandCri(searchParams) {
    return instance.get("/product/GoodsbrandCri",{params:searchParams});
}
export function addFirstProduct(searchParams) {
    return instance.get("/goods/GoodsSupplierVo",{params:searchParams});
}

export function typeBrandVoService(searchParams) {
    return instance.get("/product/typeBrandVoService",{params:searchParams});
}
export function GoodstypeCri(searchParams) {
    return instance.get("/product/GoodstypeCri",{params:searchParams});
}
export function addBrand(entity) {
    return instance.post(`/product/addBrand`,entity);
}
export function addSupplier(entity) {
    return instance.post(`/goods/addSupplier`,entity);
}

export function editBrand(entity) {
    return instance.put(`/product/editBrand`,entity);
}
export function editSupplier(entity) {
    return instance.put(`/goods/editSupplier`,entity);
}

export function updateTypeForBrand(entity) {
    return instance.put(`/product/updateTypeForBrand`,entity);
}
export function updateGoodsStatus(entity) {
    return instance.put(`/goods/updateGoodsStatus`,entity);
}

export function addTypes(entity) {
    return instance.post(`/product/addTypes`,entity);
}
export function add(entity) {
    return instance.post(`/goods/addcheck`,entity);
}

export function getGoodsSearch() {
    return instance.get(`/goods/getGoodsSearch`);
}
export function goodsCheckService() {
    return instance.get(`/goods/goodsCheckService`);
}
export function goodsSupplier(searchParams) {
    return instance.get("/goods/goodsSupplier",{params:searchParams});
}
export function priceCheckVoService(searchParams) {
    return instance.get("/goods/priceCheckVoService",{params:searchParams});
}